import { NgModule } from "@angular/core";
import { Routes, RouterModule } from "@angular/router";

const routes: Routes = [
  {
    path: "trade",
    loadChildren: "@/trade/trade.module#TradeModule",
    canActivate: [],
    data: {}
  },
  {
    path: "assets",
    loadChildren: "@/assets/assets.module#AssetsModule",
    canActivate: [],
    data: {}
  },
  {
    path: "u",
    loadChildren: "@/user/user.module#UserModule",
    canActivate: [],
    data: {}
  },
  {
    path: "main",
    loadChildren: "@/main/main.module#MainModule",
    canActivate: [],
    data: {}
  },
  {
    path: "share",
    loadChildren: "@/share/share.module#ShareModule",
    canActivate: [],
    data: {}
  },
  {
    path: "good",
    loadChildren: "@/good/good.module#GoodModule",
    canActivate: [],
    data: {}
  },
  {
    path: "",
    redirectTo: "main/home",
    pathMatch: "full"
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes, { useHash: true })],
  exports: [RouterModule]
})
export class AppRoutingModule {}
